import numpy as np
from tqdm import tqdm
import glob
file = "npu800.npy"
print(file)
 
a = np.load(file, allow_pickle=True)

data = a[0].flatten()
for i in tqdm(range(a.shape[0]-1)):
    data = np.concatenate((data, a[i+1].flatten()))

x_axis = [0]
ax = 10
for i in range(10):
    ax = ax / 10
    x_axis.extend([ax,-ax])
x_axis = sorted(x_axis)

lists = [[] for i in range(len(x_axis)+1)]

for num in tqdm(data):
    
    for index in range(len(x_axis)):
        if num <= x_axis[index]:
            lists[index].append(num)
            break
        elif index==len(x_axis):
            lists[-1].append(num)


for i in range(len(lists)):
    print(len(lists[i])/len(data))
